<!doctype html>
<html class="no-js">
<head>
<include file="Public:top"/>
<style>
  img{
    width: 200px;
    height: 200px;
    margin-right: 150px;
  }
</style>
</head>
<body>
<!--[if lte IE 9]><p class="browsehappy">升级你的浏览器吧！ <a href="http://se.360.cn/" target="_blank">升级浏览器</a>以获得更好的体验！</p><![endif]-->
</head>
<body>
<header class="am-topbar admin-header">
 <include file='Public:header'/>
</header>
<div class="am-cf admin-main"> 
<include file='Public:left'/>
<div class=" admin-content">
<div class="daohang">
      <ul>
        <li><a href="{:U('Admin/Index/index')}">
        <button type="button" class="am-btn am-btn-default am-radius am-btn-xs">
        首页
        </a></li> 
      </ul>
    </div>	
<div class="admin-biaogelist">	
    <div class="listbiaoti am-cf">
      <ul class="am-icon-flag on"> 栏目名称</ul>      
      <dl class="am-icon-home" style="float: right;"> 当前位置： <a href="{:U(Admin/Index/index)}">首页</a> > <a href="{:U(Admin/Lister/lister)}">添加商品子图片</a></dl>   
    </div>
    <div class="fbneirong">
      <form class="am-form" action="images_check" method="post" enctype="multipart/form-data">
         <div class="am-form-group am-cf">
          <div class="zuo">商品分类:</div>
          <div class="you">
            <input type="hidden" name="wares_entry_id" value="{$arr.wares_id}"> 
             <div>{$arr.wares_name}</div>
          </div>
        </div>
        <div class="am-form-group am-cf">
          <div class="zuo">产品图片：</div>
          <div class="you" style="height: 45px;">
            <input type="file" id="file0" name="images_name[]" onchange="show()" multiple="multiple" >
            <p class="am-form-help">请选择要上传的图片...</p>
          </div>
        </div>
        <div class="am-form-group am-cf">
          <div class="you" style="margin-left: 11%;">
              <button type="submit" class="am-btn am-btn-success am-radius">发布</button>&nbsp;&nbsp; 
          </div>
        </div>
        <div id="show">
          
        </div>
      </form>
    </div>
 <div class="foods">
 <include file='Public:footer'/>
</div>
</div>
</div>
</div>
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/polyfill/rem.min.js"></script>
<script src="assets/js/polyfill/respond.min.js"></script>
<script src="assets/js/amazeui.legacy.js"></script>
<![endif]--> 
<!--[if (gte IE 9)|!(IE)]><!--> 
<script src="__PUBLIC__/Admin/js/amazeui.min.js"></script> 
<!--<![endif]-->
<script>
  function show(){
        $('#show').empty();
        var imgList = document.getElementById('file0').files;    //获取浏览框对象
        var num = document.getElementById('file0').files.length; //获取浏览框上传文件的个数
        var createObjectURL = function (blod) {   //创建URL对象
            return window[window.webkitURL ? 'webkitURL' : 'URL']['createObjectURL'](blod);
        };
        for (var i = 0; i < num; i++) {
            var img = document.getElementById('file0').files[i];
            var src = createObjectURL(img);
            //$("img").attr("src",src);
            var imgEle = document.createElement('img');
            document.getElementById('show').appendChild(imgEle);
            imgEle.src = src;
        }
    }

</script>
</body>
</html>